package com.lzm.back.entity;


import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @TableName score
 */
@Data
public class Score {
    private Integer id;

    private String username;
    // 参赛者姓名（对应SQL中的u.username）

    private String name;    // 赛事名称（对应SQL中的e.name）
    //todo:前端传递下面3个参数
    private Integer userId;

    private Integer eventId;

    private Integer judgeId;
    private String judgeName;

    @DecimalMin(value = "0.00", message = "分数不能低于0分")
    @DecimalMax(value = "100.00", message = "分数不能超过100分")
    private BigDecimal score;
    private BigDecimal maxScore;
    private BigDecimal avgScore;
    private BigDecimal minScore;

    @Size(max = 500, message = "评语长度不能超过500字符")
    private String comment;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;
}